<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>首页栏目/详情页面</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/systemStatic/style/admin.css">
    <link rel="stylesheet" href="${ctx}/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="${ctx}/css/public.css">
    <script type="text/javascript">
        var __ctx = "${ctx}";
    </script>
</head>
<body>
    <div class="layui-fluid ccpui-addedModifiedPages" style="padding: 10px;position: absolute;left: 0;overflow: auto;top: 0; bottom: 0;right: 0;">
        <div class="layui-row">
            <div class="layui-col-xs12">
                <div class="layui-card">
                    <div class="layui-card-header">
                        <a href="${ctx}/system/indexColumn/view/list" title="返回"><i class="layui-icon layui-icon-return"></i></a> 查看栏目信息
                    </div>
                    <div class="layui-card-body">
                        <form class="layui-form" action="" lay-filter="sysIndexColumnViewForm">
                            <div class="layui-form-item">
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label">栏目名称</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="name"  autocomplete="off" class="layui-input" readonly="readonly" />
                                    </div>
                                </div>
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label">栏目别名</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="alias"  autocomplete="off" class="layui-input" readonly="readonly" />
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                               <!-- <div class="layui-col-xs6">
                                    <label class="layui-form-label">栏目分类</label>
                                    <div class="layui-input-block">
                                        <select name="catalog" disabled="disabled">
                                            <option value="">请选择分类</option>&ndash;&gt;
                                            <#if catalogList?exists>
                                                <#list catalogList as item>
                                                    <option value="${item.typeId}">${item.typeName}</option>
                                                </#list>
                                            </#if>
                                        </select>
                                    </div>
                                </div>-->
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label">栏目类型</label>
                                    <div class="layui-input-block">
                                        <select name="colType" disabled="disabled">
                                            <option value="0">一般类型栏目</option>
                                            <option value="1">图表类型栏目</option>
                                            <option value="2">日历类型栏目</option>
                                            <option value="3">滚动类型栏目</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label">数据加载方式</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="dataMode"  autocomplete="off" class="layui-input" readonly="readonly" />
                                    </div>
                                </div>
                                <!--<div class="layui-col-xs6">
                                    <label class="layui-form-label">数据来源</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="dataFromName"  autocomplete="off" class="layui-input" readonly="readonly" />
                                    </div>
                                </div>-->
                            </div>
                            <div class="layui-form-item">
                                <!--<div class="layui-col-xs6">
                                    <label class="layui-form-label">数据别名</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="dsAlias"  autocomplete="off" class="layui-input" readonly="readonly" />
                                    </div>
                                </div>
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label">数据源名称</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="dsName"  autocomplete="off" class="layui-input" readonly="readonly" />
                                    </div>
                                </div>-->
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label">栏目高度</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="colHeight"  autocomplete="off" class="layui-input" readonly="readonly"  />
                                    </div>
                                </div>
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label">栏目URL</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="colUrl"  autocomplete="off" class="layui-input" readonly="readonly" />
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label">是否分页</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="needPage"  autocomplete="off" class="layui-input" readonly="readonly" />
                                    </div>
                                </div>
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label">是否公共栏目</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="isPublic"  autocomplete="off" class="layui-input" readonly="readonly" />
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                              <!--  <div class="layui-col-xs6">
                                    <label class="layui-form-label">所属组织ID</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="orgId"  autocomplete="off" class="layui-input" readonly="readonly"  />
                                    </div>
                                </div>-->
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label">是否支持刷新</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="supportRefesh"  autocomplete="off" class="layui-input" readonly="readonly" />
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label">刷新时间</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="refreshTime"  autocomplete="off" class="layui-input" readonly="readonly"  />
                                    </div>
                                </div>
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label">展示效果</label>
                                    <div class="layui-input-block">
                                        <select name="showEffect" disabled="disabled">
                                            <option value="0">默认效果</option>
                                            <option value="1">走马灯</option>
                                            <option value="2">幻灯片</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label">栏目模版</label>
                                    <div class="layui-input-block" style="width: 80%">
                                        <textarea type="text" name="templateHtml"  autocomplete="off" class="layui-textarea " readonly="readonly" style="height: 200px"></textarea>
                                    </div>
                                </div>
                                <div class="layui-col-xs6">
                                    <label class="layui-form-label">描述</label>
                                    <div class="layui-input-block" style="width: 80%">
                                        <textarea type="text" name="memo"  autocomplete="off" class="layui-input" readonly="readonly"  style="height: 200px"></textarea>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item" style="margin: 5px 0;text-align: center">
                                <div class="layui-input-block" style="text-align: center">
                                    <a  href="${ctx}/system/indexColumn/view/list" class="layui-btn layui-btn-danger">返回</a>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="${ctx}/public/component.js" type="text/javascript"></script>
    <script src="${ctx}/layui/layui.js"></script>
    <script>
        layui.config({
            base: serverPath.systemPath + staticPath.systemPath //静态资源所在路径
        }).extend({
            index: 'index' //主入口模块
        }).use(['index','setter','commons','form','jquery'], function () {
           var setter=layui.setter,commons=layui.commons,form=layui.form,$=layui.jquery;
           var id='${id}';
           $.ajax({
               url: serverPath.systemPath + setter.sysLinkPath + "indexColumn/get",
               type: "get",
               dataType: 'json',
               data: {id:id},
               success: function (data) {
                   var returnDate = data.data;
                   if (commons._filterRecord(data)) {
                       form.val('sysIndexColumnViewForm', {
                           "name": returnDate.name,
                           "alias": returnDate.alias,
                           "catalog": returnDate.catalog,
                           "colType": returnDate.colType,
                           "dataMode": returnDate.dataMode == 0 ? "Service方法" : "自定义查询",
                           "dataFromName": returnDate.dataFromName,
                           "dsAlias": returnDate.dsAlias,
                           "dsName": returnDate.dsName,
                           "colHeight": returnDate.colHeight,
                           "colUrl": returnDate.colUrl,
                           "templateHtml": returnDate.templateHtml,
                           "isPublic": returnDate.isPublic == 0? "否" : "是",
                           "orgId": returnDate.orgId,
                           "supportRefesh": returnDate.supportRefresh == 0 ? "否" : "是",
                           "showEffect": returnDate.showEffect,
                           "memo": returnDate.memo,
                           "refreshTime":returnDate.refreshTime,
                           "needPage": returnDate.needPage == 0 ? "否" : "是"
                       });
                   } else {
                       layer.alert(data.msg);
                   }
               }
           });
       })
    </script>
    </body>
    </html>